/*
 * Copyright (C) 2008-2012  Paulo Cesar Pereira de Andrade.
 *
 * This is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * Authors:
 *	Paulo Cesar Pereira de Andrade
 */

#ifndef _eeval_t
#define _eeval_t

#include "etypes.h"

/*
 * Prototypes
 */
extern void
init_eval(void);

extern void
finish_eval(void);

extern void
ecoerce(eobject_t *pointer, etype_t type, eobject_t value);

extern void
ecopy(eobject_t *pointer, eobject_t value);

extern ebool_t
efalse_p(eobject_t object);

extern void
eeval_unary(east_t *ast);

extern void
eeval_binary(east_t *ast);

extern void
eeval_shift(east_t *ast);

extern void
eeval_boolean(east_t *ast);

extern eobject_t
eeval_neg(void);

extern eobject_t
eeval_not(void);

extern eobject_t
eeval_com(void);

extern eobject_t
eeval_ne(void);

extern eobject_t
eeval_lt(void);

extern eobject_t
eeval_le(void);

extern eobject_t
eeval_eq(void);

extern eobject_t
eeval_ge(void);

extern eobject_t
eeval_gt(void);

extern eobject_t
eeval_and(void);

extern eobject_t
eeval_or(void);

extern eobject_t
eeval_xor(void);

extern eobject_t
eeval_mul2(eint32_t shift);

extern eobject_t
eeval_div2(eint32_t shift);

extern eobject_t
eeval_shl(eint32_t shift);

extern eobject_t
eeval_shr(eint32_t shift);

extern eobject_t
eeval_add(void);

extern eobject_t
eeval_sub(void);

extern eobject_t
eeval_mul(void);

extern eobject_t
eeval_div(void);

extern eobject_t
eeval_trunc2(void);

extern eobject_t
eeval_rem(void);

extern eobject_t
eeval_complex(void);

#endif /* _eeval_h */
